<template>
  <div style="display:flex;">
    <el-select v-model="dataForm[scriptItem.text][scriptItem.selectValue]"
               filterable
               :placeholder="scriptItem.selectHint"
               default-first-option>
      <el-option v-for="its in scriptItem.selectList"
                 :key="its.value"
                 :label="its.label"
                 :value="its.value"></el-option>
    </el-select>
    <el-input v-model="dataForm[scriptItem.text][scriptItem.inputValue]"
              style="width: 400px;margin-left: 40px;"></el-input>
  </div>
</template>

<script>
import TypeSelect from '@/components/script-render/components/type-customized-select'
import mixinTypeViewModule from '@/mixins/script-type-view-module'
import TypeText from '@/components/script-render/components/type-text'

export default {
  mixins: [mixinTypeViewModule],
  components: {
    TypeSelect,
    TypeText
  },
  methods: {
    getInputValue () {
      try {
        if (this.dataForm[this.scriptItem.text][this.scriptItem.inputValue]) {
          return this.dataForm[this.scriptItem.text][this.scriptItem.inputValue]
        } else {
          // if (this.comInputIsRequired) {
          //   this.$message.error(this.$t('custom.tips.required', { fields: this.scriptItem.inputLable }))
          //   return false
          // } else {
          //   return true
          // }
          return false
        }
      } catch (e) {
        return false
      }
    }
  }
}
</script>

<style scoped lang='scss'>
.required-input {
  &::before {
    content: "*";
    color: red;
    position: absolute;
    left: -10px;
  }
}
</style>
